package com.zelma.consumer.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


import com.zelma.consumer.entity.UserEntity;
import com.zelma.consumer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.zelma.consumer.entity.SignEntity;
import com.zelma.consumer.service.SignService;
import com.zelma.common.utils.PageUtils;
import com.zelma.common.utils.R;



/**
 *
 *
 * @author zelma
 * @email 1239115389@qq.com
 * @date 2022-01-06 17:00:48
 */
@RestController
@RequestMapping("consumer/sign")
@SuppressWarnings("all")
public class SignController {
    @Autowired
    private UserService userService;

    @Autowired
    private SignService signService;

    @GetMapping("/enlist")
    public R Enlist(@RequestParam("userId")Integer userId,
                    @RequestParam("groupbuyId") Integer groupbuyId){
        UserEntity byId = userService.getById(userId);
        List<SignEntity> signEntity = signService.list();
        return signService.Enlist(byId,signEntity,groupbuyId);
    }





}
